package org.iks.user.web.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.iks.common.aop.serializer.EnumJackSonSerializer;
import org.iks.common.constant.Constant;
import org.iks.user.enums.ApplyFriendStatus;
import org.iks.user.enums.ApplySourceType;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;

import java.util.Date;

/**
 * Author kzou
 * Date 2024/2/13
 * Description: 好友列表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserFriendRespVo {

    @NonNull
    @Schema(description = "ID")
    private Integer id;

    @Nullable
    @Schema(description = "好友备注")
    private String friendNote;

    @Nullable
    @Schema(description = "添加好友的描述信息")
    private String applyNote;

    @NonNull
    @Schema(description = "账号")
    private String userAccount;

    @NonNull
    @Schema(description = "账号")
    private String creatorAccount;

    @Nullable
    @JsonSerialize(using = EnumJackSonSerializer.class)
    @Schema(description = "来源:", type = "java.lang.Integer", allowableValues = {"-1", "1", "2"})
    private ApplySourceType applySourceType;

    @NonNull
    @Schema(description = "好友信息")
    private UserInfoVo friendUserInfo;

    @JsonFormat(pattern = Constant.DATE_TIME_FORMAT)
    @Schema(description = "创建时间")
    private Date createTime;

    @Nullable
    @JsonSerialize(using = EnumJackSonSerializer.class)
    @Schema(description = "创建状态", type="java.lang.Integer")
    private ApplyFriendStatus status;

}
